package com.wanglei.ssm.service;

import com.wanglei.ssm.domain.Permission;

import java.util.List;

public interface PermissionService {
    List<Permission> findAll() throws Exception;

    void save(Permission permission) throws Exception;

    /**
     * 查询当前角色未引用的资源权限
     *
     * @param roleId 角色id
     * @return 未引用的资源权限信息
     * @throws Exception e
     */
    List<Permission> findOtherPermission(String roleId) throws Exception;

    /**
     * 根据id查询
     *
     * @param permissionId 资源权限id
     * @return 资源权限信息
     * @throws Exception e
     */
    Permission findById(String permissionId) throws Exception;
}
